First post, so please excuse formatting faux-pas.
I'm having difficulty reconciling intreg and oprobit results.
Conceptually, the two are very similar, with the difference being that in an interval regression we know the cut thresholds. This intuition is supported by: Interval Regression | Stata Data Analysis Examples (ucla.edu)
This led me to try the following:
```
clear
set seed 4321
set obs 10000
///
/// Generate some data that has 6 bins
///
gen x1 = rnormal()
gen x2 = rnormal()
gen x3 = rnormal()
gen ystar = 1*x1 + 2*x2 + 3*x3 +rnormal()*0.2
drop if ystar < -3 | ystar > 3
quietly sum ystar
local bottom=floor(`r(min)')
local top=ceil(`r(max)')
egen y = cut(y), at(`bottom'(1)`top')
///
/// Try fitting an unconstrained probit model to the data
///
oprobit y x1 x2 x3
///
/// We see that the scaling is wrong
/// This is because the scaling of the residuals is assumed to be 1, whereas ours are 0.2
/// Otherwise, the coefficients are close to the data generating process
///
constraint define 1 /cut1=-2
constraint define 2 /cut2=/cut1+1
constraint define 3 /cut3=/cut2+1
constraint define 4 /cut4=/cut3+1
constraint define 5 /cut5=/cut4+1
oprobit y x1 x2 x3, constraints(1/5)
///
/// This doesn't seem to work well, not sure why?
///
///
/// If we use Stata's built in `intreg' command to handle this, it works well
///
gen ll = floor(ystar)
gen ul = ceil(ystar)
intreg ll ul x1 x2 x3
```
Can someone tell me what's the difference between providing the thresholds in the form of constraints, versus as intervals for intreg?
I'm having difficulty reconciling intreg and oprobit results.
Conceptually, the two are very similar, with the difference being that in an interval regression we know the cut thresholds. This intuition is supported by: Interval Regression | Stata Data Analysis Examples (ucla.edu)
This led me to try the following:
```
clear
set seed 4321
set obs 10000
///
/// Generate some data that has 6 bins
///
gen x1 = rnormal()
gen x2 = rnormal()
gen x3 = rnormal()
gen ystar = 1*x1 + 2*x2 + 3*x3 +rnormal()*0.2
drop if ystar < -3 | ystar > 3
quietly sum ystar
local bottom=floor(`r(min)')
local top=ceil(`r(max)')
egen y = cut(y), at(`bottom'(1)`top')
///
/// Try fitting an unconstrained probit model to the data
///
oprobit y x1 x2 x3
///
/// We see that the scaling is wrong
/// This is because the scaling of the residuals is assumed to be 1, whereas ours are 0.2
/// Otherwise, the coefficients are close to the data generating process
///
constraint define 1 /cut1=-2
constraint define 2 /cut2=/cut1+1
constraint define 3 /cut3=/cut2+1
constraint define 4 /cut4=/cut3+1
constraint define 5 /cut5=/cut4+1
oprobit y x1 x2 x3, constraints(1/5)
///
/// This doesn't seem to work well, not sure why?
///
///
/// If we use Stata's built in `intreg' command to handle this, it works well
///
gen ll = floor(ystar)
gen ul = ceil(ystar)
intreg ll ul x1 x2 x3
```
Can someone tell me what's the difference between providing the thresholds in the form of constraints, versus as intervals for intreg?
Comment